package com.spi.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@RocketMQMessageListener(topic = "${rocketmq.consumer.group4.topic}", consumerGroup = "${rocketmq.consumer.group4.consumer-group}")
@Component
@Slf4j
public class ConsumerGroup4Listener implements RocketMQListener<String> {
    @Override
    public void onMessage(String string) {
        System.out.println("消费者组4 进行消费：" + string);
        //throw new RuntimeException("消费者组4手动抛异常");
    }
}
